package demo2;

import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        char[][] chars=new char[20][];
        int n=scanner.nextInt();
        for (int i=0;i<n;i++){
            chars[i]= scanner.next().toCharArray();
        }
        String s=scanner.next();
        Solution solution=new Solution();
        solution.wordPuzzle(chars,s);
    }
}
class Solution {
    public boolean wordPuzzle(char[][] grid, String target) {

    }
}